medata here is the Mediterranean dataframe with the following changes:
Some more work needed:
p1 <- ggplot(medata, aes(x = medata$lon, y = medata$lat)) +
geom_jitter(aes(colour = medata$tmax), show.legend = T) +
xlab("Longitude") + ylab("Latitude") +
scale_color_gradient(name = "Max Annual Temp", low = "#3c9ab1", high = "#f22300", na.value = "#899da4")
ggplotly(p1)
1259 rows removed from above plot because they contained NA values.
medata_na <- subset(medata, is.na(medata))
nrow(medata_na)
## [1] 145042
temp_na <- subset(medata, is.na(medata$tmax))
nrow(temp_na)
## [1] 2850
loc_na <- subset(medata, is.na(medata$lat))
nrow(loc_na)
## [1] 1259
baktana..
spp_na <- subset(medata, is.na(medata$species))
nrow(spp_na)
## [1] 0
good!
mpa_na <- subset(medata, is.na(medata$protection))
nrow(mpa_na)
## [1] 637
All of the above can be printed as tables, they’re just extremely long.